﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//vusing GC;

namespace Collection
{

    public class Disk
    {
        protected string name;
        protected List<Track> tracks;

        public Disk(string name)
        {
            tracks = new List<Track>();
            this.name = name;

        }
        public int getLength()
        {

            int length = 0;

            for (int i = 0; i < this.tracks.Count; i++)

                length += this.tracks[i].getLength();

            return length;

        }
        public void addTrack(Track track)
        {

            this.tracks.Add(track);

        }
        public void rmTrack(int id)
        {

            this.tracks.RemoveAt(id);

        }
        public Track getTrack(int id)
        {

            return this.tracks[id];

        }
        public List<Track> getTracks()
        {

            return this.tracks;

        }
    }

    public class Track
    {
        protected string name;
        protected int length;
        protected int bitrate;
        protected string genre;
        protected string type;

        public string getName()
        {

            return this.name;

        }
        public void setName(string name)
        {

            this.name = name;

        }
        public void setLength(int length)
        {

            this.length = length;

        }
        public int getLength()
        {

            return this.length;

        }
        public int getBitRate()
        {

            return this.bitrate;

        }
        public void setBitRate(int bitrate)
        {

            this.bitrate = bitrate;

        }
        public void setGenre(string genre)
        {

            this.genre = genre;

        }
        public string getGenre()
        {

            return this.genre;

        }
        public void setType(string type)
        {

            this.type = type;

        }
        public string getType()
        {

            return this.type;

        }
        public Track() { }
        public Track(string name, int length, int bitrate, string genre, string type)
        {

            this.name = name;
            this.length = length;
            this.bitrate = bitrate;
            this.genre = genre;
            this.type = type;

        }
    }
    //---------------------------
    public class Instrumental : Track
    {

        public Instrumental(string name, int length, int bitrate, string genre, string type)
            : base(name, length, bitrate, genre, type)
        {
            this.type = "instrumental";

        }

    }

    public class Song : Track
    {

        public Song(string name, int length, int bitrate, string genre, string type)
            : base(name, length, bitrate, genre, type)
        {

            this.type = "song";

        }
    }

    public class Pop : Instrumental
    {

        public Pop(string name, int length, int bitrate, string genre, string type)
            : base(name, length, bitrate, genre, type)
        {

            this.genre = "pop";

        }

    }

    public class Rock : Instrumental
    {

        public Rock(string name, int length, int bitrate, string genre, string type)
            : base(name, length, bitrate, genre, type)
        {

            this.genre = "rock";

        }
    }

    public class Club : Instrumental
    {

        public Club(string name, int length, int bitrate, string genre, string type)
            : base(name, length, bitrate, genre, type)
        {

            this.genre = "club";

        }

    }

}
